﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class basecon_recvers : System.Web.UI.UserControl
{
    protected Recvers Rv;
    protected void Page_Load(object sender, EventArgs e)
    {
        this.imgX.ImageUrl = Params.ImagesFolderHttp + "x.gif";
        if (this.Rv == null)
        {
            this.Rv = new Recvers();
        }
        if (Request.Params["recvers"] != null)
        {
            this.RecversStr = Server.UrlDecode(Request.Params["recvers"]);
        }
    }

    public int UserGuid
    {
        set
        {
            this.hidUserGuid.Value = value.ToString();
            if (this.Rv == null)
            {
                this.Rv = new Recvers();
            }
            this.Rv.Init(value);
        }
        get
        {
            return Convert.ToInt32(this.hidUserGuid.Value);
        }
    }

    public string RvHtml
    {
        get
        {
            if (Page.IsPostBack)
            {
                return Server.HtmlDecode(this.hidRvHtml.Value);
            }
            else
            {
                this.hidRvHtml.Value = Server.HtmlEncode(this.Rv.ToHTML());
                string s1 = this.hidRvHtml.Value;
                string s2 = Server.HtmlDecode(s1);
                return s2;
            }
        }
    }

    public string RecversStr
    {
        set
        {
            this.hidRecvers.Value = value.Trim();
        }
        get
        {
            return this.hidRecvers.Value.Trim();
        }
    }

    public bool EnableEdit
    {
        set
        {
            this.hidEnableEdit.Value = value.ToString();
        }
        get
        {
            if (this.hidEnableEdit.Value.Trim() != "")
            {
                return Convert.ToBoolean(this.hidEnableEdit.Value);
            }
            else
            {
                return true;
            }
        }
    }
}
